package pun.potato;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class LoginActivity extends FragmentActivity {
	
	
	private LoginFragment loginFragment;
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.loginscreen);		
		
		//facebook login
		if(savedInstanceState == null){
			//add the fragment on initial activity setup
			loginFragment = new LoginFragment();
			getSupportFragmentManager()
			.beginTransaction()
			.add(android.R.id.content, loginFragment)
			.commit();
		}
		else{
			//or set the fragment from restored state info
			loginFragment = (LoginFragment)getSupportFragmentManager()
					.findFragmentById(android.R.id.content);
		}
			
	}
	


}
